package com.xinchao.job.task;

import org.quartz.DisallowConcurrentExecution;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.quartz.QuartzJobBean;
import org.springframework.util.StopWatch;

import com.xinchao.job.service.DeviceDuplicatePropCheckJobService;


/**
 * 
 * <p>Title: DeviceDuplicatePropCheckJob</p>  
 * <p>Description: 设备重要属性重复性检查：系统设计为点位id可重复，设备更换sim上网卡后sim信息也可以重复。需要对这些情况做相应处理</p>  
 * @author huangf 
 * @date 2018年9月27日
 */
@DisallowConcurrentExecution
public class DeviceDuplicatePropCheckJob extends QuartzJobBean{
	private static Logger logger = LoggerFactory.getLogger(DeviceDuplicatePropCheckJob.class);
	
	@Autowired
	private DeviceDuplicatePropCheckJobService deviceDuplicatePropCheckJobService;
	@Override
	protected void executeInternal(JobExecutionContext context) throws JobExecutionException {
		StopWatch stopWatch = new StopWatch();  
		stopWatch.start();
		deviceDuplicatePropCheckJobService.check();
		stopWatch.stop();
		logger.info("【DeviceDuplicatePropCheckJobService】执行完毕，执行时间："+stopWatch.getTotalTimeSeconds());
	}

}